.\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
.\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
.\"
.\" SPDX-License-Identifier: GPL-3.0-or-later
.\"
.TH proc_pid_oom_score 5 2024-05-02 "Linux man-pages 6.9.1"
.SH NAME
/proc/pid/oom_score \- OOM-killer score
.SH DESCRIPTION
.TP
.IR /proc/ pid /oom_score " (since Linux 2.6.11)"
.\" See mm/oom_kill.c::badness() before Linux 2.6.36 sources
.\" See mm/oom_kill.c::oom_badness() after Linux 2.6.36
.\" commit a63d83f427fbce97a6cea0db2e64b0eb8435cd10
This file displays the current score that the kernel gives to
this process for the purpose of selecting a process
for the OOM-killer.
A higher score means that the process is more likely to be
selected by the OOM-killer.
The basis for this score is the amount of memory used by the process,
with increases (+) or decreases (\-) for factors including:
.\" See mm/oom_kill.c::badness() before Linux 2.6.36 sources
.\" See mm/oom_kill.c::oom_badness() after Linux 2.6.36
.\" commit a63d83f427fbce97a6cea0db2e64b0eb8435cd10
.RS
.IP \[bu] 3
whether the process is privileged (\-).
.\" More precisely, if it has CAP_SYS_ADMIN or (pre 2.6.36) CAP_SYS_RESOURCE
.RE
.IP
Before Linux 2.6.36
the following factors were also used in the calculation of oom_score:
.RS
.IP \[bu] 3
whether the process creates a lot of children using
.BR fork (2)
(+);
.IP \[bu]
whether the process has been running a long time,
or has used a lot of CPU time (\-);
.IP \[bu]
whether the process has a low nice value (i.e., > 0) (+); and
.IP \[bu]
whether the process is making direct hardware access (\-).
.\" More precisely, if it has CAP_SYS_RAWIO
.RE
.IP
The
.I oom_score
also reflects the adjustment specified by the
.I oom_score_adj
or
.I oom_adj
setting for the process.
.SH SEE ALSO
.BR proc (5),
.BR proc_pid_oom_score_adj (5)
